Criterion B Details

# Default ecosystem code for template development.
# This line is replaced by build_ecosystem_pages.py for each ecosystem.
ecosystem_code = 'Bosque Inundable Subandino'

Import Python modules.

import os
import yaml
from pathlib import Path
from lonboard import Map
from rle.core import Ecosystems, criterion_b_status, rle_category
from rle.core.eoo import make_eoo
from rle.core.aoo import make_aoo_grid

Load the country config file.

project_root = os.environ.get('PIXI_PROJECT_ROOT', str(Path('..').resolve()))
config_path = Path(project_root) / 'config' / 'country_config.yaml'
with open(config_path) as f:
    config = yaml.safe_load(f)

# Ecosystem index (the COG pixel value for this ecosystem), looked up by code
# from the canonical index table. Absent if the index has not been built yet.
import csv
ecosystem_index = None
index_csv = Path(project_root) / 'config' / 'ecosystems' / 'index.csv'
if index_csv.exists():
    with open(index_csv) as f:
        for row in csv.DictReader(f):
            if row['code'] == ecosystem_code:
                ecosystem_index = int(row['index'])
                break

Load & Filter Ecosystem Data

Load data for all the ecosystems.

import sys
# Shared config helpers live in scripts/; make them importable from here.
sys.path.insert(0, str(Path(project_root) / 'scripts'))
from _config import ensure_vector_source

source = config['ecosystem_source']
# ecosystem_code_column is optional: fall back to the name column.
ecosystem_column = source.get('ecosystem_code_column') or source.get('ecosystem_name_column')
# Prefer the ecosystem-sorted `optimized_data` copy when configured, so that
# filtering to one ecosystem uses parquet predicate pushdown instead of loading
# the whole national map into memory. Falls back to `data`.
ecosystems = Ecosystems.from_file(
    ensure_vector_source(source.get('optimized_data') or source['data']),
    ecosystem_column=ecosystem_column,
    ecosystem_name_column=source.get('ecosystem_name_column'),
    functional_group_column=source.get('functional_group_column')
)

Filter by the Bosque Inundable Subandino and check the number of features.

ecosystem = ecosystems.filter(ecosystem_code)
has_data = ecosystem.size() > 0
print(f'{ecosystem.size() = }')
if not has_data:
    from IPython.display import Markdown, display
    display(Markdown(
        f'**No spatial data found for {ecosystem_code}.** '
        f'Criterion B calculations are skipped.'
    ))
ecosystem.size() = 68

Extent of Occurrence (EOO) (subcriterion B1)

Extent of occurrence (EOO). The EOO of an ecosystem is the area (km2) of a minimum convex polygon – the smallest polygon in which no internal angle exceeds 180° that encompasses all known current spatial occurrences of the ecosystem type.

The minimum convex polygon (also known as a convex hull) must not exclude any areas, discontinuities or disjunctions, regardless of whether the ecosystem can occur in those areas or not. Regions such as oceans (for terrestrial ecosystems), land (for coastal or marine ecosystems), or areas outside the study area (such as in a different country) must remain included within the minimum convex polygon to ensure that this standardised method is comparable across ecosystem types. In addition, these features contribute to spreading risks across the distribution of the ecosystem by making different parts of its distribution more spatially independent.

Calculate EOO

Start by calculating the convex hull of the ecosystem’s distribution.

import geopandas as gpd

if has_data:
    ecosystem_geometry = ecosystem.geometry.union_all()
    gdf_ecosystem_polygons = gpd.GeoDataFrame(geometry=[ecosystem_geometry], crs=ecosystem.geometry.crs)
    hull = ecosystem_geometry.convex_hull
    gdf_hull = gpd.GeoDataFrame(geometry=[hull], crs=ecosystem.geometry.crs)

Display the ecosystem’s distribution and the convex hull.

from lonboard import Map, PolygonLayer
from rle.core.viz import smart_map

if has_data:
    eoo_hull = make_eoo(ecosystem).compute()
    display(smart_map([eoo_hull, ecosystem]))
/home/runner/work/rle-tyler-colombia/rle-tyler-colombia/.pixi/envs/default/lib/python3.11/site-packages/lonboard/_geoarrow/ops/reproject.py:116: UserWarning: Input being reprojected to EPSG:4326 CRS.
Lonboard is only able to render data in EPSG:4326 projection.
  warnings.warn(
/home/runner/work/rle-tyler-colombia/rle-tyler-colombia/.pixi/envs/default/lib/python3.11/site-packages/lonboard/_geoarrow/ops/reproject.py:116: UserWarning: Input being reprojected to EPSG:4326 CRS.
Lonboard is only able to render data in EPSG:4326 projection.
  warnings.warn(
if has_data:
    hull_ea = gdf_hull.to_crs("ESRI:54034")
    eoo = hull_ea.geometry.iloc[0].area / 1e6
    print(f'EOO is {eoo:.1f} km2')
EOO is 319641.6 km2

Then calculate the area of the convex hull polygon.

Direct calculation of EOO

EOO can also be calculated directly using …

if has_data:
    ecosystem.eoo

Verify that the area returned by calling make_eoo(ecosystem).compute().area_km2 is the same as the area of the convex hull polygon.

if has_data:
    assert ecosystem.eoo == eoo

Area of Occupancy (AOO) (subcriterion B2)

The protocol for this adjustment includes the following steps:

  1. Intersect AOO grid with the ecosystem’s distribution map.
  2. Calculate extent of the ecosystem type in each grid cell (area) and sum these areas to obtain the total ecosystem area (total area).
  3. Arrange grid cells in ascending order based on their area (smaller first). Calculate accumulated sum of area per cell (cumulative area).
  4. Calculate cumulative proportion by dividing cumulative area by total area (cumulative proportion takes values between 0 and 1)
  5. Calculate AOO by counting the number of cells with a cumulative proportion greater than 0.01 (i.e. exclude cells that in combination account for up to 1% of the total mapped extent of the ecosystem type).

AOO Calculation Details

Intersect AOO grid and ecosystem map

  1. Intersect AOO grid with the ecosystem’s distribution map
from pathlib import Path
from rle.core.aoo import make_aoo_grid_cached

if has_data:
    # Prefer a prebuilt grid cache (e.g. a gs:// URI) so the national AOO grid
    # is not recomputed during CI renders — computing it from the full national
    # ecosystem map peaks at many GB of RAM. Fall back to a local cache when no
    # prebuilt cache is configured. Build one with `pixi run build-caches`.
    cache_path = (
        source.get('aoo_grid_cache_url')
        or (Path(project_root) / '.cache' / 'aoo_grid.parquet')
    )
    aoo_grid = make_aoo_grid_cached(ecosystems, cache_path=cache_path)
    aoo_grid_filtered = aoo_grid.filter_by_ecosystem(ecosystem_code)

Visualize variations in the AOO grid.

from matplotlib.colors import LinearSegmentedColormap
from lonboard.colormap import apply_continuous_cmap
from rle.core.aoo import slugify_ecosystem_name

ecosystem_column = slugify_ecosystem_name(ecosystem_code)
if has_data:
    cmap = LinearSegmentedColormap.from_list("white_red", ["white", "red"])
    values = aoo_grid_filtered.grid_cells[ecosystem_column].values
    normalized = (values - values.min()) / (values.max() - values.min())
    colors = apply_continuous_cmap(normalized, cmap)
    display(smart_map([(aoo_grid_filtered, {"get_fill_color": colors}), ecosystem]))
/home/runner/work/rle-tyler-colombia/rle-tyler-colombia/.pixi/envs/default/lib/python3.11/site-packages/lonboard/_geoarrow/ops/reproject.py:116: UserWarning: Input being reprojected to EPSG:4326 CRS.
Lonboard is only able to render data in EPSG:4326 projection.
  warnings.warn(

Calculate grid cell area and total area

  1. Calculate extent of the ecosystem type in each grid cell (area) and sum these areas to obtain the total ecosystem area (total area).
if has_data:
    keep = ['geometry', 'grid_col', 'grid_row', ecosystem_column]
    gdf = aoo_grid_filtered.grid_cells[keep]
    display(gdf)
geometry grid_col grid_row Bosque_Inundable_Subandino
0 POLYGON ((-77.16528 8.07488, -77.16528 8.16621... -860 89 0.003415
1 POLYGON ((-77.07545 0.63307, -77.07545 0.72351... -859 7 0.027903
2 POLYGON ((-77.07545 0.72351, -77.07545 0.81396... -859 8 0.017704
3 POLYGON ((-77.07545 0.81396, -77.07545 0.90441... -859 9 0.001126
4 POLYGON ((-76.98562 0.63307, -76.98562 0.72351... -858 7 0.002668
5 POLYGON ((-76.62629 0.99486, -76.62629 1.08531... -854 11 0.034231
6 POLYGON ((-76.62629 4.073, -76.62629 4.16367, ... -854 45 0.023179
7 POLYGON ((-76.53646 4.073, -76.53646 4.16367, ... -853 45 0.000013
8 POLYGON ((-76.53646 4.70788, -76.53646 4.79862... -853 52 0.010988
9 POLYGON ((-76.53646 6.6162, -76.53646 6.70724,... -853 73 0.055664
10 POLYGON ((-76.53646 6.70724, -76.53646 6.79829... -853 74 0.020277
11 POLYGON ((-76.44663 6.6162, -76.44663 6.70724,... -852 73 0.070227
12 POLYGON ((-76.44663 6.70724, -76.44663 6.79829... -852 74 0.115757
13 POLYGON ((-76.3568 1.44714, -76.3568 1.53761, ... -851 16 0.014531
14 POLYGON ((-76.26697 1.44714, -76.26697 1.53761... -850 16 0.011955
15 POLYGON ((-76.26697 6.52518, -76.26697 6.6162,... -850 72 0.000652
16 POLYGON ((-76.26697 6.6162, -76.26697 6.70724,... -850 73 0.006363
17 POLYGON ((-76.17714 5.52498, -76.17714 5.61584... -849 61 0.000492
18 POLYGON ((-76.17714 5.61584, -76.17714 5.70671... -849 62 0.021376
19 POLYGON ((-76.17714 5.70671, -76.17714 5.79759... -849 63 0.024700
20 POLYGON ((-76.17714 5.79759, -76.17714 5.88849... -849 64 0.007110
21 POLYGON ((-76.17714 6.43418, -76.17714 6.52518... -849 71 0.001240
22 POLYGON ((-76.17714 6.52518, -76.17714 6.6162,... -849 72 0.002172
23 POLYGON ((-76.17714 6.6162, -76.17714 6.70724,... -849 73 0.008999
24 POLYGON ((-76.17714 6.70724, -76.17714 6.79829... -849 74 0.016014
25 POLYGON ((-76.17714 6.79829, -76.17714 6.88936... -849 75 0.008811
26 POLYGON ((-76.17714 7.16266, -76.17714 7.2538,... -849 79 0.007957
27 POLYGON ((-76.0873 6.6162, -76.0873 6.70724, -... -848 73 0.001796
28 POLYGON ((-76.0873 6.70724, -76.0873 6.79829, ... -848 74 0.004334
29 POLYGON ((-75.99747 1.26622, -75.99747 1.35668... -847 14 0.004852
30 POLYGON ((-75.99747 5.79759, -75.99747 5.88849... -847 64 0.005028
31 POLYGON ((-75.99747 5.88849, -75.99747 5.9794,... -847 65 0.002545
32 POLYGON ((-75.99747 6.70724, -75.99747 6.79829... -847 74 0.008857
33 POLYGON ((-74.91949 6.88936, -74.91949 6.98044... -835 76 0.003907
34 POLYGON ((-74.20084 7.70977, -74.20084 7.80102... -827 85 0.004770
35 POLYGON ((-74.20084 7.80102, -74.20084 7.89229... -827 86 0.001045
36 POLYGON ((-74.02118 3.16686, -74.02118 3.25744... -825 35 0.014095
37 POLYGON ((-73.93135 2.80464, -73.93135 2.89518... -824 31 0.011688
38 POLYGON ((-73.93135 2.89518, -73.93135 2.98573... -824 32 0.002010
39 POLYGON ((-73.84152 2.80464, -73.84152 2.89518... -823 31 0.046898
40 POLYGON ((-73.84152 2.89518, -73.84152 2.98573... -823 32 0.027811
41 POLYGON ((-72.76354 7.61854, -72.76354 7.70977... -811 84 0.016068
42 POLYGON ((-72.13472 6.88936, -72.13472 6.98044... -804 76 0.012582
43 POLYGON ((-72.04489 6.25222, -72.04489 6.34319... -803 69 0.001378
44 POLYGON ((-72.04489 6.88936, -72.04489 6.98044... -803 76 0.011890
45 POLYGON ((-72.04489 7.07154, -72.04489 7.16266... -803 78 0.022860
46 POLYGON ((-71.95505 6.16126, -71.95505 6.25222... -802 68 0.001702
47 POLYGON ((-71.95505 6.25222, -71.95505 6.34319... -802 69 0.010130
48 POLYGON ((-71.86522 6.34319, -71.86522 6.43418... -801 70 0.002928

The column Bosque_Inundable_Subandino contains the (fractional) area of the ecosystem in each grid cell.

Sum up the areas of each grid cell to get the total area.

if has_data:
    total_area = gdf[ecosystem_column].sum()
    display(total_area)
np.float64(0.7346963693236319)

Calculate cumulative area

  1. Arrange grid cells in ascending order based on their area (smaller first). Calculate accumulated sum of area per cell (cumulative area).
if has_data:
    gdf = gdf.sort_values(by=ecosystem_column)
    gdf["cumulative_area"] = gdf[ecosystem_column].cumsum()
    display(gdf)
geometry grid_col grid_row Bosque_Inundable_Subandino cumulative_area
7 POLYGON ((-76.53646 4.073, -76.53646 4.16367, ... -853 45 0.000013 0.000013
17 POLYGON ((-76.17714 5.52498, -76.17714 5.61584... -849 61 0.000492 0.000505
15 POLYGON ((-76.26697 6.52518, -76.26697 6.6162,... -850 72 0.000652 0.001157
35 POLYGON ((-74.20084 7.80102, -74.20084 7.89229... -827 86 0.001045 0.002202
3 POLYGON ((-77.07545 0.81396, -77.07545 0.90441... -859 9 0.001126 0.003329
21 POLYGON ((-76.17714 6.43418, -76.17714 6.52518... -849 71 0.001240 0.004568
43 POLYGON ((-72.04489 6.25222, -72.04489 6.34319... -803 69 0.001378 0.005946
46 POLYGON ((-71.95505 6.16126, -71.95505 6.25222... -802 68 0.001702 0.007648
27 POLYGON ((-76.0873 6.6162, -76.0873 6.70724, -... -848 73 0.001796 0.009444
38 POLYGON ((-73.93135 2.89518, -73.93135 2.98573... -824 32 0.002010 0.011454
22 POLYGON ((-76.17714 6.52518, -76.17714 6.6162,... -849 72 0.002172 0.013626
31 POLYGON ((-75.99747 5.88849, -75.99747 5.9794,... -847 65 0.002545 0.016170
4 POLYGON ((-76.98562 0.63307, -76.98562 0.72351... -858 7 0.002668 0.018838
48 POLYGON ((-71.86522 6.34319, -71.86522 6.43418... -801 70 0.002928 0.021767
0 POLYGON ((-77.16528 8.07488, -77.16528 8.16621... -860 89 0.003415 0.025182
33 POLYGON ((-74.91949 6.88936, -74.91949 6.98044... -835 76 0.003907 0.029088
28 POLYGON ((-76.0873 6.70724, -76.0873 6.79829, ... -848 74 0.004334 0.033422
34 POLYGON ((-74.20084 7.70977, -74.20084 7.80102... -827 85 0.004770 0.038192
29 POLYGON ((-75.99747 1.26622, -75.99747 1.35668... -847 14 0.004852 0.043044
30 POLYGON ((-75.99747 5.79759, -75.99747 5.88849... -847 64 0.005028 0.048072
16 POLYGON ((-76.26697 6.6162, -76.26697 6.70724,... -850 73 0.006363 0.054435
20 POLYGON ((-76.17714 5.79759, -76.17714 5.88849... -849 64 0.007110 0.061545
26 POLYGON ((-76.17714 7.16266, -76.17714 7.2538,... -849 79 0.007957 0.069502
25 POLYGON ((-76.17714 6.79829, -76.17714 6.88936... -849 75 0.008811 0.078313
32 POLYGON ((-75.99747 6.70724, -75.99747 6.79829... -847 74 0.008857 0.087170
23 POLYGON ((-76.17714 6.6162, -76.17714 6.70724,... -849 73 0.008999 0.096169
47 POLYGON ((-71.95505 6.25222, -71.95505 6.34319... -802 69 0.010130 0.106299
8 POLYGON ((-76.53646 4.70788, -76.53646 4.79862... -853 52 0.010988 0.117287
37 POLYGON ((-73.93135 2.80464, -73.93135 2.89518... -824 31 0.011688 0.128975
44 POLYGON ((-72.04489 6.88936, -72.04489 6.98044... -803 76 0.011890 0.140865
14 POLYGON ((-76.26697 1.44714, -76.26697 1.53761... -850 16 0.011955 0.152820
42 POLYGON ((-72.13472 6.88936, -72.13472 6.98044... -804 76 0.012582 0.165402
36 POLYGON ((-74.02118 3.16686, -74.02118 3.25744... -825 35 0.014095 0.179497
13 POLYGON ((-76.3568 1.44714, -76.3568 1.53761, ... -851 16 0.014531 0.194028
24 POLYGON ((-76.17714 6.70724, -76.17714 6.79829... -849 74 0.016014 0.210042
41 POLYGON ((-72.76354 7.61854, -72.76354 7.70977... -811 84 0.016068 0.226110
2 POLYGON ((-77.07545 0.72351, -77.07545 0.81396... -859 8 0.017704 0.243814
10 POLYGON ((-76.53646 6.70724, -76.53646 6.79829... -853 74 0.020277 0.264092
18 POLYGON ((-76.17714 5.61584, -76.17714 5.70671... -849 62 0.021376 0.285468
45 POLYGON ((-72.04489 7.07154, -72.04489 7.16266... -803 78 0.022860 0.308328
6 POLYGON ((-76.62629 4.073, -76.62629 4.16367, ... -854 45 0.023179 0.331507
19 POLYGON ((-76.17714 5.70671, -76.17714 5.79759... -849 63 0.024700 0.356206
40 POLYGON ((-73.84152 2.89518, -73.84152 2.98573... -823 32 0.027811 0.384017
1 POLYGON ((-77.07545 0.63307, -77.07545 0.72351... -859 7 0.027903 0.411920
5 POLYGON ((-76.62629 0.99486, -76.62629 1.08531... -854 11 0.034231 0.446151
39 POLYGON ((-73.84152 2.80464, -73.84152 2.89518... -823 31 0.046898 0.493049
9 POLYGON ((-76.53646 6.6162, -76.53646 6.70724,... -853 73 0.055664 0.548713
11 POLYGON ((-76.44663 6.6162, -76.44663 6.70724,... -852 73 0.070227 0.618940
12 POLYGON ((-76.44663 6.70724, -76.44663 6.79829... -852 74 0.115757 0.734696

Calculate cumulative proportion

  1. Calculate cumulative proportion by dividing cumulative area by total area (cumulative proportion takes values between 0 and 1)
if has_data:
    gdf["cumulative_proportion"] = gdf["cumulative_area"] / total_area
    display(gdf)
geometry grid_col grid_row Bosque_Inundable_Subandino cumulative_area cumulative_proportion
7 POLYGON ((-76.53646 4.073, -76.53646 4.16367, ... -853 45 0.000013 0.000013 0.000018
17 POLYGON ((-76.17714 5.52498, -76.17714 5.61584... -849 61 0.000492 0.000505 0.000687
15 POLYGON ((-76.26697 6.52518, -76.26697 6.6162,... -850 72 0.000652 0.001157 0.001575
35 POLYGON ((-74.20084 7.80102, -74.20084 7.89229... -827 86 0.001045 0.002202 0.002998
3 POLYGON ((-77.07545 0.81396, -77.07545 0.90441... -859 9 0.001126 0.003329 0.004531
21 POLYGON ((-76.17714 6.43418, -76.17714 6.52518... -849 71 0.001240 0.004568 0.006218
43 POLYGON ((-72.04489 6.25222, -72.04489 6.34319... -803 69 0.001378 0.005946 0.008094
46 POLYGON ((-71.95505 6.16126, -71.95505 6.25222... -802 68 0.001702 0.007648 0.010410
27 POLYGON ((-76.0873 6.6162, -76.0873 6.70724, -... -848 73 0.001796 0.009444 0.012855
38 POLYGON ((-73.93135 2.89518, -73.93135 2.98573... -824 32 0.002010 0.011454 0.015590
22 POLYGON ((-76.17714 6.52518, -76.17714 6.6162,... -849 72 0.002172 0.013626 0.018546
31 POLYGON ((-75.99747 5.88849, -75.99747 5.9794,... -847 65 0.002545 0.016170 0.022010
4 POLYGON ((-76.98562 0.63307, -76.98562 0.72351... -858 7 0.002668 0.018838 0.025641
48 POLYGON ((-71.86522 6.34319, -71.86522 6.43418... -801 70 0.002928 0.021767 0.029627
0 POLYGON ((-77.16528 8.07488, -77.16528 8.16621... -860 89 0.003415 0.025182 0.034275
33 POLYGON ((-74.91949 6.88936, -74.91949 6.98044... -835 76 0.003907 0.029088 0.039592
28 POLYGON ((-76.0873 6.70724, -76.0873 6.79829, ... -848 74 0.004334 0.033422 0.045491
34 POLYGON ((-74.20084 7.70977, -74.20084 7.80102... -827 85 0.004770 0.038192 0.051984
29 POLYGON ((-75.99747 1.26622, -75.99747 1.35668... -847 14 0.004852 0.043044 0.058588
30 POLYGON ((-75.99747 5.79759, -75.99747 5.88849... -847 64 0.005028 0.048072 0.065431
16 POLYGON ((-76.26697 6.6162, -76.26697 6.70724,... -850 73 0.006363 0.054435 0.074092
20 POLYGON ((-76.17714 5.79759, -76.17714 5.88849... -849 64 0.007110 0.061545 0.083769
26 POLYGON ((-76.17714 7.16266, -76.17714 7.2538,... -849 79 0.007957 0.069502 0.094600
25 POLYGON ((-76.17714 6.79829, -76.17714 6.88936... -849 75 0.008811 0.078313 0.106592
32 POLYGON ((-75.99747 6.70724, -75.99747 6.79829... -847 74 0.008857 0.087170 0.118647
23 POLYGON ((-76.17714 6.6162, -76.17714 6.70724,... -849 73 0.008999 0.096169 0.130896
47 POLYGON ((-71.95505 6.25222, -71.95505 6.34319... -802 69 0.010130 0.106299 0.144684
8 POLYGON ((-76.53646 4.70788, -76.53646 4.79862... -853 52 0.010988 0.117287 0.159639
37 POLYGON ((-73.93135 2.80464, -73.93135 2.89518... -824 31 0.011688 0.128975 0.175548
44 POLYGON ((-72.04489 6.88936, -72.04489 6.98044... -803 76 0.011890 0.140865 0.191732
14 POLYGON ((-76.26697 1.44714, -76.26697 1.53761... -850 16 0.011955 0.152820 0.208004
42 POLYGON ((-72.13472 6.88936, -72.13472 6.98044... -804 76 0.012582 0.165402 0.225130
36 POLYGON ((-74.02118 3.16686, -74.02118 3.25744... -825 35 0.014095 0.179497 0.244315
13 POLYGON ((-76.3568 1.44714, -76.3568 1.53761, ... -851 16 0.014531 0.194028 0.264093
24 POLYGON ((-76.17714 6.70724, -76.17714 6.79829... -849 74 0.016014 0.210042 0.285890
41 POLYGON ((-72.76354 7.61854, -72.76354 7.70977... -811 84 0.016068 0.226110 0.307760
2 POLYGON ((-77.07545 0.72351, -77.07545 0.81396... -859 8 0.017704 0.243814 0.331857
10 POLYGON ((-76.53646 6.70724, -76.53646 6.79829... -853 74 0.020277 0.264092 0.359457
18 POLYGON ((-76.17714 5.61584, -76.17714 5.70671... -849 62 0.021376 0.285468 0.388552
45 POLYGON ((-72.04489 7.07154, -72.04489 7.16266... -803 78 0.022860 0.308328 0.419667
6 POLYGON ((-76.62629 4.073, -76.62629 4.16367, ... -854 45 0.023179 0.331507 0.451216
19 POLYGON ((-76.17714 5.70671, -76.17714 5.79759... -849 63 0.024700 0.356206 0.484835
40 POLYGON ((-73.84152 2.89518, -73.84152 2.98573... -823 32 0.027811 0.384017 0.522688
1 POLYGON ((-77.07545 0.63307, -77.07545 0.72351... -859 7 0.027903 0.411920 0.560667
5 POLYGON ((-76.62629 0.99486, -76.62629 1.08531... -854 11 0.034231 0.446151 0.607259
39 POLYGON ((-73.84152 2.80464, -73.84152 2.89518... -823 31 0.046898 0.493049 0.671092
9 POLYGON ((-76.53646 6.6162, -76.53646 6.70724,... -853 73 0.055664 0.548713 0.746857
11 POLYGON ((-76.44663 6.6162, -76.44663 6.70724,... -852 73 0.070227 0.618940 0.842443
12 POLYGON ((-76.44663 6.70724, -76.44663 6.79829... -852 74 0.115757 0.734696 1.000000

Count AOO cells

  1. Calculate AOO by counting the number of cells with a cumulative proportion greater than 0.01 (i.e. exclude cells that in combination account for up to 1% of the total mapped extent of the ecosystem type).
if has_data:
    aoo = len(gdf[gdf["cumulative_proportion"] > 0.01])
    print(f'AOO is {aoo} cells')
AOO is 42 cells

AOO Calculation (direct call)

if has_data:
    aoo_count = ecosystem.aoo
    print(f'AOO: {aoo_count} grid cells')
AOO: 42 grid cells

Criterion B Summary

Criterion B status (spatial)
Vulnerable (VU) — Bosque Inundable Subandino (Bosque Inundable Subandino), index 35

Status reflects the spatial thresholds for EOO (B1) and AOO (B2) only. A final listing under B1/B2 additionally requires at least one of: (a) an observed or inferred continuing decline; (b) threatening processes likely to cause continuing decline within 20 years; or (c) few threat-defined locations — none of which are derived from the spatial metrics.

Sub-criterion Metric Value Category
B1 EOO 319642 km² Least Concern (LC)
B2 AOO 42 cells Vulnerable (VU)
Overall B — — Vulnerable (VU)